#!/usr/bin/env python
# coding=utf-8


from abc import ABC, abstractmethod
from typing import Any, Callable, Generic, TypeVar

T = TypeVar("T")


class SignalInterface(ABC, Generic[T]):
    """SignalInterface with generic
    Although Python supports duck types,
    we still want to be able to standardize behavior with some type hints.

    If you encounter ABC inheritance issues, you can try the following methods.

    def emit_signal(self):
        raise ...
    """

    @abstractmethod
    def emit_signal(self):
        pass

    @abstractmethod
    def connect_slot(self, btn: T, fn: Callable[[T, Any], None] = None, *args, **kwargs):
        pass
